import axios from "axios";

const subConfig = require("../../sub.config");
const { assrt, shooter } = subConfig;

export const queryAssrt = (data) => {
  return axios({
    method: assrt.method,
    url: "/assrt/v1/sub/search",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
      Authorization: `Bearer ${assrt.token}`,
    },
    data: data,
  });
};

export const queryAssrtDetail = (data) => {
  return axios({
    method: assrt.method,
    url: "/assrt/v1/sub/detail",
    headers: {
      "Content-Type": "application/x-www-form-urlencoded",
      Authorization: `Bearer ${assrt.token}`,
    },
    data: data,
  });
};

export const queryshooter = (data) => {
  return axios({
    method: "/shooter/api/subapi.php",
    url: shooter.apiUrl,
    data,
  });
};
